package com.dms.modules.admin.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
@ApiModel(value = "MerchantCreateDTO", description = "创建商家的请求参数")
public class MerchantCreateDTO {
    
    @ApiModelProperty(value = "关联的用户ID（若不提供则创建新用户）")
    private Long userId;
    
    @ApiModelProperty(value = "昵称")
    private String nickname;
    
    @ApiModelProperty(value = "头像")
    private String avatar;
    
    @Email(message = "邮箱格式不正确")
    @ApiModelProperty(value = "邮箱")
    private String email;
    
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    @ApiModelProperty(value = "手机号")
    private String phone;
    
    @NotBlank(message = "店铺名称不能为空")
    @ApiModelProperty(value = "店铺名称", required = true)
    private String shopName;
    
    @ApiModelProperty(value = "店铺logo")
    private String shopLogo;
    
    @ApiModelProperty(value = "店铺描述")
    private String shopDesc;
    
    @NotBlank(message = "营业执照号不能为空")
    @ApiModelProperty(value = "营业执照号", required = true)
    private String businessLicense;
    
    @NotBlank(message = "法人姓名不能为空")
    @ApiModelProperty(value = "法人姓名", required = true)
    private String legalPerson;
    
    @NotBlank(message = "联系电话不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    @ApiModelProperty(value = "联系电话", required = true)
    private String contactPhone;
    
    @ApiModelProperty(value = "联系邮箱")
    private String contactEmail;
    
    @NotBlank(message = "店铺地址不能为空")
    @ApiModelProperty(value = "店铺地址", required = true)
    private String address;
    
    @ApiModelProperty(value = "营业执照图片")
    private String businessLicenseImage;
    
    @ApiModelProperty(value = "法人身份证号")
    private String legalPersonIdCard;
    
    @ApiModelProperty(value = "法人身份证正面照片")
    private String legalPersonIdCardFront;
    
    @ApiModelProperty(value = "法人身份证背面照片")
    private String legalPersonIdCardBack;
    
    @ApiModelProperty(value = "店铺公告")
    private String notice;
    
    @ApiModelProperty(value = "营业时间")
    private String businessHours;
    
    @ApiModelProperty(value = "售后政策")
    private String afterSalePolicy;
    
    @ApiModelProperty(value = "店铺协议")
    private String shopAgreement;
} 